﻿
CREATE PROCEDURE [svc].[GetMaximumCpuTimeWithInstanceName]
(
	@FromDate				datetime,
	@ToDate					datetime 
)
AS
BEGIN

SELECT TOP 1 InstanceName, DatabaseName, CpuTime FROM dbo.ExecSessionLog 
WHERE LastModifiedDate BETWEEN @FromDate AND @ToDate 
ORDER BY CpuTime DESC 

END